<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>管理员端主界面</title>
    <link rel="stylesheet" href="../../dist/css/layui.css">
    <script src="../../dist/layui.js"></script>
    <script src="../../dist/jquery-1_8_3.js"></script>
    <script type="text/javascript">
        function loadBody(target) {
            $(".layui-body").val("")
                .html('<iframe src="' + target + '" height="100%" width="100%" ' +
                    'style="border-style: none"></iframe>');
        }
    </script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-cyan">
        <div class="layui-logo layui-hide-xs layui-bg-cyan"><a style="color: white" href="javascript:loadBody('init.jsp');">勤工助学系统--管理员端</a></div>

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:">
                    <img src="/images/admin.png" class="layui-nav-img" alt="身份标识">
                    ${sessionScope.get("username")}
                </a>
                <dl class="layui-nav-child">
                    <dd><a id="updatePwd"><i class="layui-icon layui-icon-edit"></i> 修改密码 </a></dd>
                    <dd><a href="/user/logout"><i class="layui-icon layui-icon-logout"></i> 退出登录 </a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">事务审批</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:loadBody('student_work_application.jsp');">学生岗位申请</a></dd>
                        <dd><a href="javascript:loadBody('student_work_motion.jsp');">学生岗位变动</a></dd>
                        <dd><a href="javascript:loadBody('dept_job_application.jsp');">部门岗位申请</a></dd>
                        <dd><a href="javascript:loadBody('dept_job_motion.jsp');">部门岗位变动</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:">在岗学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:loadBody('work_motion_directly.jsp');">变更岗位</a></dd>
                        <dd><a href="javascript:loadBody('work_distribution_record.jsp');">岗位分配查询</a></dd>
                        <dd><a href="javascript:loadBody('working_attendance_select.jsp');">考勤查询</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:">信息查询</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:loadBody('all_student_message_select.jsp');">全部学生信息</a></dd>
                        <dd><a href="javascript:loadBody('all_attendance_select.jsp');">全部考勤查询</a></dd>
                        <dd><a href="javascript:loadBody('student_application_record.jsp');">学生申请记录</a></dd>
                        <dd><a href="javascript:loadBody('dept_application_record.jsp');">部门申请记录</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:">工资管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:loadBody('job_salary_change.jsp');">岗位工资变更</a></dd>
                        <dd><a href="javascript:loadBody('student_salary_select.jsp');">学生工资查询</a></dd>
                        <dd><a href="javascript:loadBody('student_salary_control.jsp');">发放学生工资</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:loadBody('work_evaluation_select.jsp');">查看用工评价</a>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body" style="padding: 0">
        <iframe src="init.jsp" height="100%" width="100%" style="border-style: none"></iframe>
    </div>

</div>
<script>

    layui.use(['element', 'layer', 'util'], function () {
        var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , $ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function (othis) {
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            , menuRight: function () {
                layer.open({
                    type: 1
                    , content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    , area: ['260px', '100%']
                    , offset: 'rt' //右上角
                    , anim: 5
                    , shadeClose: true
                });
            }
        });
    });
</script>
<script>
        var updatePwd = $("#updatePwd");
        // 点击了修改密码
        updatePwd.on('click', function () {
            layer.open({
                type: 2,
                title:"修改密码",
                area: ['400px', '300px'],
                offset: ['170px', '520px'],
                btn: '关闭',
                content: '/jsp/public/update_password.jsp',
                yes:function(index, layero){
                    layer.close(index);
                    return false;
                },
                //
                end : function () {
                }
            });
        });
</script>
</body>
</html>